.NET Framework Class Library |
ParallelEnumerable..::.GroupBy<(Of <(TSource, TKey>)>) Method (ParallelQuery<(Of <(TSource>)>), Func<(Of <(TSource, TKey>)>)) |
ParallelEnumerable Class See Also Send Feedback |
Groups in parallel the elements of a sequence according to a specified key selector function.
Namespace:
System.Linq
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Shared Function GroupBy(Of TSource, TKey) ( _ source As ParallelQuery(Of TSource), _ keySelector As Func(Of TSource, TKey) _ ) As ParallelQuery(Of IGrouping(Of TKey, TSource)) |
C# |
---|
public static ParallelQuery<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>( ParallelQuery<TSource> source, Func<TSource, TKey> keySelector ) |
Parameters
- source
- Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
An OrderedParallelQuery{TSource}than contains elements to sort.
- keySelector
- Type: System..::.Func<(Of <(TSource, TKey>)>)
A function to extract a key from an element.
Type Parameters
- TSource
- The type of elements of source.
- TKey
- The type of the key returned by keySelector.